package com.ddx.common.enums;

/**
 * @author junqiang.wang
 * @ClassName ResultType
 * @Description BannerType
 * @Company: www.eloancn.com
 * @date 2016/9/21 15:08
 */

public enum InvestStatus {


    INITIALIZATION(0,"初始化"),
    IN_INTEREST_RATE(1,"计息中"),
    ALREADY_PRESENTED(2,"已转出"),
    EXPIRED(3,"已到期"),
    INVEST_FAILURE(4,"投资失败"),
    NEW_TENDER_EXPIRE(5,"新手标到期");
    private Integer code;
    private String msg;

    InvestStatus(Integer code, String msg) {
        this.code=code;
        this.msg=msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static InvestStatus getInvestType(Integer code) {
        for (InvestStatus t : InvestStatus.values()) {
            if (code.equals(t.getCode())) {
                return t;
            }
        }
        return null;
    }
}
